package de.tum.in.eist.im.client.Chat;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import de.tum.in.eist.im.shared.ChatChannel.ChatChannel;
import de.tum.in.eist.im.shared.User.User;


/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("chatPanelService")
public interface ChatPanelService extends RemoteService {
	
	// get the id of a channel with a given title
	String getApiToken(String username);
	Long getChatChannelId(String channelTitle);
	Long getPrivateChatChannelId(User thisUser, User otherUser);
	
	// add a user to the list of all! online users
	Boolean addUserAsOnline(User user);
	Boolean removeUserAsOnline(User user);
	String getOnlineUsersFromServerAsString();
	
	// add a group to the list of all! open groups
	Boolean addGroupAsOpen(ChatChannel chatChannel);
	Boolean addPrivateGroupAsOpen(ChatChannel chatChannel);
	Boolean removeGroupAsOpen(ChatChannel chatChannel);
	String getOnlineGroupsFromServerAsString();
}